/**
 * 
 */
package org.cuatrovientos.rollthedice;

import java.util.Random;

/**
 * @author unai_inigo
 *
 */
public class Dice {
//attributes
	
private int sides;
	
// constructor
/**
 * a dice with six sides
 */
public Dice() {
	sides = 6;
}
/**
 * any dice  with any number of sides
 * @param sides
 */
public Dice(int sides) {
	this.sides = sides;
}
// methods
/**
 * roll the dice
 * @return value
 */
public int roll () {
	Random random = new Random();
	return random.nextInt(sides)+1;
}
}
